package com.dlb.andorid.activity;

import androidx.recyclerview.widget.GridLayoutManager;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import android.view.View;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.dlb.andorid.R;
import com.kwan.xframe.mvp.presenter.BasePresenter;
import com.kwan.xframe.mvp.view.activity.BaseCommonActivity;

import java.util.ArrayList;
import java.util.List;

public class FpzqActivity extends BaseCommonActivity {

	@Override
	protected BasePresenter getBasePresenter() {
		return null;
	}

	RecyclerView rv_title, rv_item;
	BaseQuickAdapter<String, BaseViewHolder> mTitleAdapter, mItemAdapter;

	List<String> mTitleDates = new ArrayList<>();
	List<String> mItemDates = new ArrayList<>();

	@Override
	protected void initViews() {
		super.initViews();

		rv_title = findViewById(R.id.rv_title);
		rv_title.setLayoutManager(new LinearLayoutManager(this));
		rv_title.setLayerType(View.LAYER_TYPE_SOFTWARE, null);
		rv_title.setLayerType(View.LAYER_TYPE_HARDWARE, null);
		rv_title.setLayerType(View.LAYER_TYPE_NONE, null);
		rv_title.setHasFixedSize(true);
		rv_title.setItemAnimator(null);
		rv_title.setNestedScrollingEnabled(false);

		for (int i = 0; i < 3; i++)
			mTitleDates.add("");

		mTitleAdapter = new BaseQuickAdapter<String, BaseViewHolder>(R.layout.list_item_fpzq_title, mTitleDates) {
			@Override
			protected void convert(BaseViewHolder helper, String item) {

			}
		};


		rv_title.setAdapter(mTitleAdapter);

		rv_item = findViewById(R.id.rv_item);
		rv_item.setLayoutManager(new GridLayoutManager(this, 2));
		rv_item.setLayerType(View.LAYER_TYPE_SOFTWARE, null);
		rv_item.setLayerType(View.LAYER_TYPE_HARDWARE, null);
		rv_item.setLayerType(View.LAYER_TYPE_NONE, null);
		rv_item.setHasFixedSize(true);
		rv_item.setItemAnimator(null);
		rv_item.setNestedScrollingEnabled(false);

		for (int i = 0; i < 10; i++)
			mItemDates.add("");

		mItemAdapter = new BaseQuickAdapter<String, BaseViewHolder>(R.layout.list_item_fpzq_item,mItemDates) {
			@Override
			protected void convert(BaseViewHolder helper, String item) {

			}
		};

		rv_item.setAdapter(mItemAdapter);

	}

	@Override
	protected void initData() {

	}

	@Override
	protected int getTopViewId() {
		return 0;
	}

	@Override
	protected int getMainViewId() {
		return R.layout.activity_fpzq;
	}

	@Override
	protected int getBottomViewId() {
		return 0;
	}

	@Override
	protected String getTitleTxt() {
		return "扶贫专区";
	}

	@Override
	public String getPageName() {
		return null;
	}
}
